<?php
if(Yii::app()->user->isGuest):
	if(Yii::app()->controller->id!='account'):
?>

<div class="nav_set_button">

	<!--<xn:login-button autologoutlink="true" background="white" size="small"></xn:login-button>-->
	<a href="/account/login" class="register_button">登录</a>
	<a href="/account/register" class="register_button">注册</a>
	<a class="helf" href="/tools">工具</a>
	<a class="helf" href="/tools/bookmark">书签</a>
	<a class="helf" href="/help">帮助</a>
	<a class="helf" href="/rss/view">RSS</a>
</div>


	<?php endif;
 
 else:?>

<div class="nav_set_button">
	<?switch(Yii::app()->user->logintype){
		case 'self':
	?>
			<a class="user_name" href="/upper/<?=Yii::app()->user->id?>"><?=Yii::app()->user->name?></a>
			<a class="set" href="/setting">设置</a>
			<a class="helf" href="/help">帮助</a>
			<a class="helf" href="/tools">工具</a>
			<a class="helf" href="/tools/bookmark">书签</a>
			<a class="helf" href="/rss/view">RSS</a>
			<a class="out" href="/account/logout">退出</a>
	<?
			break;
		case 'renren':
	?>
			<a class="user_name" href="/upper/<?=Yii::app()->user->id?>"><img src="/images/connect_light_small.png" class="xnconnect_login_button"><?=Yii::app()->user->name?></a>
			<a class="set" href="/setting">设置</a>
			<a class="helf" href="/help">帮助</a>
			<a class="helf" href="/tools">工具</a>
			<a class="helf" href="/tools/bookmark">书签</a>
			<a class="helf" href="/rss/view">RSS</a>
			<a href="javascript:;" onclick="XN.Connect.logout(function(){renren_logout();});return false;">退出</a>
	<?
			break;
	}?>
</div>
 <?endif?>